package server.edu.unisannio;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;

public class ServerBroadcastReceiver extends BroadcastReceiver {
private static final String ACTION = "org.unisannio.custom.STRING_SENT";
	
	
	@Override
	public void onReceive(Context context, Intent intent) {
//		if (intent != null && intent.getAction() != null
//				&& ACTION.compareToIgnoreCase(intent.getAction()) == 0) {
//			
////			Log.d("MySmsReceiver", "SMS Message Received.");
////			Bundle bundle=getResultExtras(true); DA ERRORE A RUNTIME
//			Bundle bundle=intent.getExtras(true);
//			String nostraStringa=bundle.getCharSequence("stringaInviata").toString();
//			Toast toast=Toast.makeText(context, "Server - Stringa ricevuta: "+nostraStringa, Toast.LENGTH_LONG);
//			toast.show();
//			
//			String nuovaStringa="Buongiorno anche a te! Come stai?";
//			
//			bundle.putString("stringaPersonalizzata", nuovaStringa);
//
//			bundle.putString("altra stringa", "test");
//			bundle.putString("stringaInviata", nuovaStringa);
//			
//			Log.d("ServerBroadcastRCVR", intent.getExtras().toString());
//		}
	}

}
